#ifndef UTILS_H
#define UTILS_H

#include <cstdint>

typedef int64_t int64;
typedef uint64_t u64;
typedef int32_t int32;
typedef uint32_t u32;

#include <vector>
#include <opencv2/opencv.hpp>

#include "constants.h"

struct Pos2F {
    double x,y;
    Pos2F():x(0), y(0) {}
    Pos2F(double x, double y): x(x), y(y) {}
};

typedef std::vector<cv::Point> Contour;
typedef std::vector<Contour> Contours;


typedef long long int64;


double getDis2f(const Pos2F& pos1, const Pos2F& pos2);

Pos2F removeOffset(const Pos2F& pos);

int getTapPosIndex(Pos2F cPoses[], const Pos2F& pos);

#endif // UTILS_H
